The present invention relates generally to a semiconductor device and a method of operating the same, and more particularly to a semiconductor device capable of preventing over-spec when inputting a reset command and a method of operating the same.
A semiconductor device includes a microcontroller for controlling operations of circuits included therein.
The microcontroller controls the operations of the internal circuits in response to an operation command input to the semiconductor device. When the semiconductor device performs the operation in response to an external command, the semiconductor device may receive a reset command instructing the stop of the operation and the return to an initial state from a user. In this case, when the microcontroller executes the reset command amid a running operation, the semiconductor device may be in an abnormal state due to a resulting operation error.
In order to prevent the abnormal state, the semiconductor device may identify whether the reset command is input during a running operation by way of a reset check code.
For example, when the reset command is input from the outside during a running program operation by the external command, the program operation up to a reset check code is performed, and an initialization operation is performed thereafter. The reset check code determines whether or not a reset command is provided.
A plurality of reset check codes exists for a program operation, a reading operation, and an erase operation, but positions of the reset check codes may be different.
Accordingly, when the reset command is input from the outside, a time tRST at which the reset command is input and the time when an operation such as the program operation, the reading operation, or the erase operation, is finally completed, is not always synchronized, thereby generating over-spec in the device.